import axios from '../utils/http' // 导入http中创建的axios实例
const base_url = process.env.BASE_API
const accidentLocationApi = {
  // 新增外服登录地址信息
  add(params) {
    let url = '/proxy/cam/carAccidentLocation/add'
    return axios.post(`${base_url}${url}`, params)
  },
  // 获取热力图数据
  getList(params) {
    let url = '/proxy/cam/carAccidentLocation/getList'
    return axios.post(`${base_url}${url}`, params)
  },
  // 获取需要同步地理信息的列表
  getNeedSyncList() {
    let url = '/proxy/cam/carAccidentLocation/getNeedSyncList'
    return axios.get(`${base_url}${url}`)
  },
  // 同步地理信息
  syncNew(params) {
    let url = '/proxy/cam/carAccidentLocation/syncNew'
    return axios.post(`${base_url}${url}`, params)
  },
  // 同步地理信息
  syncBatch() {
    let url = '/proxy/cam/carAccidentLocation/sync'
    return axios.get(`${base_url}${url}`)
  },
}

export default accidentLocationApi
